module.exports = () => {
    return (err, req, res, next) => {
        if (err) {
            res.json({
                status: 500,
                message: err.message
            });
        }
        next();
    }
}
